<include file="Public:header" />
<div class="container main"> <include file="Public:left" />

  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
	//切换栏目方式
	function parseCateType(e){
		if($(e).val()==1){
			$('#pagesize').show();
		}else{
			$('#pagesize').hide();
		}
	}
	function after(e){
	    $(e).parent().parent().parent().parent().parent('li').after($(e).parent().parent().parent().parent().parent('li').prev());
    }
    function append(e){
	    $(e).parent().parent().parent().parent().parent('li').next().after($(e).parent().parent().parent().parent().parent('li'));
    }
	function delnews(e){
		$(e).parent().parent().parent().parent().parent().remove();
	}
	function addnews(){ 
		var html = $('#copyHTML').html();
		$(html).appendTo('#replyList ul');
	}
  </script>
  <style>
  .header{display:none;}
  	#replyList ul li{margin-top:5px; background:#eee; padding:8px; width:700px;}
	.delnews{display:block; width:30px; font-size:20px; height:30px; border-radius:15px; background:#f00; color:#fff; line-height:30px; text-align:center;}
  </style>

 
 

   
 
    <form class="checkoutform form-horizontal" action="{:U('update')}" method="post">
      <div class="table_ container">
      
      
      <input type="hidden" name="id" value="{$info.id}">
      
  
     <div class="form-group">
      <label class="col-sm-2 control-label">风格名称</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="文章标题">
      </div>
   </div>
      

       <div class="form-group">
      <label class="col-sm-2 control-label">效果图</label>
      <div class="col-sm-10">
         <input name="img_url" type="hidden" value="{$info.img_url}" /><img onclick="showImgBox(this);" src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="img_url" height="40" />
      </div>
   </div>
      
      
      
       <div class="form-group">
      <label class="col-sm-2 control-label">所属分类</label>
      <div class="col-sm-10">
      <select class="form-control" name="cate_id" id="pid">
          <option value="">请选择</option>
          <volist name="cateList" id="vo">
            <option <eq name="vo['id']" value="$info['cate_id']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            
          </volist>
        </select>
      
        
      </div>
   </div>
      
      <div class="form-group">
      <label class="col-sm-2 control-label">主颜色</label>
      <div class="col-sm-10">
         <input class="form-control colorpicker" datatype="*" value="{$info.color}" name="color" type="text" placeholder="颜色">
      </div>
   </div>
  
   <!--<div class="form-group">
      <label class="col-sm-2 control-label">风格</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="风格">
      </div>
   </div>-->
 
   
      
      </div>
      
        
      </div><div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>
<script type="text/javascript" src="__PUBLIC__/Js/jquery.colorpicker.js"></script>
<script>
//色板
		$('.colorpicker').each(function(index, element) {
            $(this).colorpicker({
				fillcolor:true,
				success:function(o,color){
					//$(element).css("color",color);
					$(element).change();
					$(element).val(color);
				}
			});
        });
</script>
</body></html>